//
//  PhotoUploadViewController.h
//  Tagged
//
//  Created by Dalei Li on 4/14/10.
//  Copyright 2010 Tagged. All rights reserved.
//

#import <UIKit/UIKit.h>

@class PhotoUploadViewController, TaggedAsyncConnection;

@protocol PhotoUploadViewControllerDelegate <NSObject>

- (void) photoDidUpload :(PhotoUploadViewController *)controller;

@end

@interface PhotoUploadViewController : UIViewController <UITextFieldDelegate>
/*************
{

    UIImage *selectImage;
    BOOL viewMovedUp;
    
    UIImageView *mainImageView;    
    UITextField *captionTextField;
    UIActivityIndicatorView *activityIndicator;

    NSString *caption;
    id<PhotoUploadViewControllerDelegate> __weak delegate;
    
    TaggedAppDelegate *appDelegate;
    
    NSMutableDictionary *uploadResult;
    
    TaggedAsyncConnection *uploadConnection;
	
	UIProgressView *progressView;
	UINavigationItem *navItem;
	NSTimer *timer;
}

@property (nonatomic, strong) UIImage *selectImage;
@property (nonatomic, readwrite) BOOL viewMovedUp;

@property (nonatomic, strong) IBOutlet UIImageView *mainImageView;
@property (nonatomic, strong) IBOutlet UITextField *captionTextField;
@property (nonatomic, strong) IBOutlet UIActivityIndicatorView *activityIndicator;
@property (nonatomic, weak) id<PhotoUploadViewControllerDelegate> delegate;
@property (nonatomic, strong) NSString *caption;
@property (nonatomic, strong) IBOutlet TaggedAppDelegate *appDelegate;
@property (nonatomic, strong) NSMutableDictionary *uploadResult;
@property (nonatomic, strong) TaggedAsyncConnection *uploadConnection;

@property (nonatomic, strong) IBOutlet UIProgressView *progressView;
@property (nonatomic, strong) IBOutlet UINavigationItem *navItem;
@property (nonatomic, strong) NSTimer *timer;

- (void)setViewMovedUp:(BOOL)movedUp;
- (IBAction)clickCancel;
- (IBAction)clickDone;

-(void) startUploadImage;
- (void) didEndUploadImage :(TaggedAsyncConnection *)connection;

- (void) keyboardWillShow:(NSNotification *)notification;
- (void) keyboardWillHide:(NSNotification *)notification;
-(void) startProgressBarRun;
-(void) stopProgressViewBarRun;
-(void) updateProgressBar;
 ************/
@end
